package org.oslims.domain;

import java.util.ArrayList;
import java.util.List;

import javax.persistence.CascadeType;
import javax.persistence.DiscriminatorValue;
import javax.persistence.Entity;
import javax.persistence.JoinColumn;
import javax.persistence.OneToMany;
import javax.persistence.OneToOne;

@Entity
@DiscriminatorValue("CUSTOMER")
public class Customer extends BaseUser {
	
	/**
	 * 
	 */
	private static final long serialVersionUID = -9192113408267317849L;

	@OneToOne(cascade=CascadeType.ALL)
	@JoinColumn(name="CONTACTADDRESS_ID") 
	private ContactAddress contactAdress;
	
	@OneToMany(mappedBy="requestor")
	private List<Request> requests = new ArrayList<Request>();
	
	public ContactAddress getContactAdress() {
		return contactAdress;
	}

	public void setContactAdress(ContactAddress contactAdress) {
		this.contactAdress = contactAdress;
	}

	public void setRequests(List<Request> requests) {
		this.requests = requests;
	}

	public List<Request> getRequests() {
		return requests;
	}
	
}
